package com.flash.es.controller;

import com.flash.es.domain.Search;
import com.flash.es.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
* @description: TODO
* @author admin
* @date 2023/1/910:15
* @version 1.0
*/
@RequestMapping("es")
@RestController
public class SearchController {

    @Autowired
    SearchService searchService;

    @PostMapping("/getEs")
    public List<Search> getEs(@RequestBody Map map) throws IOException {
        Long userId = com.ruoyi.common.security.utils.SecurityUtils.getUserId();
        List<Search> getes = searchService.getes(map);
        return getes;
    }
}
